<#assign base=request.contextPath />
<script>
	var base = "${base}";
</script>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"></meta>
<title>users.ftl</title>
<script type="text/javascript" src="${base}/js/jquery.min.js"></script>
<script>
	var time = new Date().getTime();
	$(function(){
		$("#time").html(new Date().getTime()-time);	
	});
</script>
</head>
<body>
<fieldset>
	<legend>页面加载耗时<span id="time"></span>ms</legend>
</fieldset>
<fieldset>
	<legend>随机数</legend>
	<#if randomInt%2==1 || randomInt%2==-1>
	  <span>随机数是奇数=${randomInt?c}</span>
	<#elseif randomInt%2==0>
	  <span>随机数是偶数=${randomInt?c}</span>
	</#if>
</fieldset>
<fieldset>
	<legend>用户列表</legend>
	<#list users>
		<table>
			<thead>
				<tr><td>ID</td><td>username</td></tr>
			</thead>
			<tbody>
			    <#items as user>
			      <tr><td>${user.id}</td><td>${user.username}</td></tr>
			    </#items>
			</tbody>
		</table>
	<#else>
	  <p>No users
	</#list>	

</fieldset>	
</body>
</html>